#ifndef _ALLOC_H_
#define _ALLOC_H_

#include <stdlib.h> //malloc()

#define CREATE(pvar, type, size) (pvar = (type*)malloc(sizeof(type) * (size)))
#define CREATE_VOID(pvar, type, size) (pvar = (void*)malloc(sizeof(type) * (size)))
#define CREATE_VOID2(pvar, type, size) (pvar = (void**)malloc(sizeof(type) * (size)))
#define RECREATE(pvar, type, nsize) (pvar = (type*)realloc(pvar, sizeof(type) * (nsize)))
#define DELETE(pvar) if(pvar){free(pvar);}

#endif
